import {createWebHistory,createRouter} from 'vue-router'

const routes = [
    {
        path:'/',
        redirect:'/login'
    },
    {
        path:'/login',
        name:'login',
        component:() => import('../components/Login.vue')
    },{
        path:'/register/:id',
        name:'register',
        component:() => import('../components/Register.vue')
    }
]

const router = createRouter({
    history:createWebHistory(),
    routes
})

export default router
